package com.example.springboot.dao;

import com.example.springboot.entity.Order_of;
import com.example.springboot.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface Order_ofDao extends Mapper<Order_of> {
    //    根据用户名查询，查询跟参数相同的用户名 返回一个用户
    @Select("select * from order_of where `userName` = #{userName}")
    Order_of findByName(@Param("userName") String userName);

    @Select("select * from order_of where `id` = #{id}")
    Order_of findById(@Param("id")Integer id);

    List<Order_of> findBySearch(@Param("search") Order_of search);

}

